package top.buyibuyi.course.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
public class Semester implements Serializable {
    private int id;
    private String sname;

    @Override
    public String toString() {
        return "Semester{" +
                "id=" + id +
                ", sname='" + sname + '\'' +
                ", startstime='" + startstime + '\'' +
                ", closetime='" + closetime + '\'' +
                ", ends='" + ends + '\'' +
                '}';
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date startstime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date closetime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date ends;
}
